#pragma once
#include"public_struct.h"
unordered_map<string, string> u_map;
int i = 0;

// Encodes a URL to a shortened URL.
string encode(string longUrl) {

	string temp = "http://tinyurl.com/" + i++;
	u_map.insert({ temp,longUrl });
	return temp;
}

// Decodes a shortened URL to its original URL.
string decode(string shortUrl) {
	return u_map[shortUrl];
}